﻿@using System.Data;
@using DTcms.Web.Mvc.UI.Controllers;
@model DTcms.Model.BaseModel
@{
    var c = new BaseController();
    ViewBag.Title = "友情链接-" + Model.site.name;
    DataTable feedback = new DTcms.Web.Plugin.Feedback.feedback().get_feedback_list(20, "");//最近20位评论者
    DataTable txtList = new DTcms.Web.Plugin.Link.link().get_link_list(0, "is_lock=0");//本站友情链接
    string templateskin = Model.templateskin;
}
<div class="container">
    <section class="mysection links-section">
        <article id="links">
            <div class="blog_close_links">
                <h4 class="h4-tit t-blue translucent pd10 afterbg"><i class="layui-icon layui-icon-dialogue-alt"></i>最近20位评论者</h4>
                <ul class="clear-after  mt25 mb25">
                    @foreach (DataRow dr in feedback.Rows)
                    {
                        <li class="link_feed_item mt25 mb25">
                            <div class="clear-after lf-con">
                                <div class="lf_left fl">
                                    <a href="@dr["web"]" target="_blank" rel="nofollow" title="@(dr["web"].ToString()!=""?"去"+dr["user_name"].ToString()+"的网站看看 ?":"没有登记网站！")" class="clear-after">
                                        <img src="@Model.templateskin/images/avatar_45.png" data-original="/style/images/ArticleImg/@dr["img_url"]" class="circle">
                                    </a>
                                </div>
                                <div class="lf_right fl translucent">
                                    <p class="t-orange">@dr["user_name"]</p>
                                    <span class="t-black">@dr["city"]</span>
                                </div>
                            </div>
                        </li>
                    }
                </ul>
            </div>
            <div class="blog_links">
                <h4 class="h4-tit t-blue translucent pd10 afterbg"><i class="el-link"></i> 本站友情链接：</h4>
                <ul class="clear-after  mt25 mb25">
                    @foreach (DataRow dr in txtList.Rows)
                    {
                        <li class="bl-item"><a href="@dr["site_url"]" target="_blank" title="@dr["content"]">@dr["title"]</a></li>
                    }
                </ul>
            </div>
            <div class="blog_links">
                <h4 class="h4-tit t-blue translucent pd10 afterbg"><i class="el-paper-clip"></i> 内页链接：</h4>
                <ul class="clear-after  mt25 mb25"></ul>
            </div>
            <div class="blog_links">
                <h4 class="h4-tit t-blue translucent pd10 afterbg"><i class="el-paper-clip-alt"></i>待审链接：以下为未审核，或被暂时撤下的链接：</h4>
                <ul class="clear-after  mt25 mb25">
                    @{
                        DataTable txtList_lock = new DTcms.Web.Plugin.Link.link().get_link_list(0, "is_lock=1");
                        foreach (DataRow dr in txtList_lock.Rows)
                        {
                            <li class="bl-item  mt25 mb25 not-allow-links"><a title="@dr["content"]">@dr["title"]</a></li>
                        }
                    }
                </ul>
            </div>
            <div class="blog_links">
                <h4 class="h4-tit t-blue translucent pd10 afterbg"><i class="el-certificate"></i> 申请友情链接条件：</h4>
                <div class="link-edit pdtb25">
                    <p><span style="color: rgb(51, 51, 51); font-family: " microsoft="" font-size:="">1、</span><span style="font-family: " microsoft="" color:="" font-size:=""><strong>在您申请本站友情链接之前请先做好本站链接</strong></span><span style="color: rgb(51, 51, 51); font-family: " microsoft="" font-size:="">，谢谢！</span><br style="color: rgb(51, 51, 51); font-family: " microsoft="" white-space:="" /><span style="color: rgb(51, 51, 51); font-family: " microsoft="" font-size:="">2、网站内容无意义，百度收录5页都没有的暂不交换！</span><br style="color: rgb(51, 51, 51); font-family: " microsoft="" white-space:="" /><span style="color: rgb(51, 51, 51); font-family: " microsoft="" font-size:="">3、淘宝、色情、反动、病毒、擦边球、纯商业、违法中华人民共和国法律的网站暂不交换！</span><br style="color: rgb(51, 51, 51); font-family: " microsoft="" white-space:="" /><span style="color: rgb(51, 51, 51); font-family: " microsoft="" font-size:="">4、申请成功后请毋随意撤下链接，其他原因撤下请通知我，否则本站也会删除对应链接！</span><br style="color: rgb(51, 51, 51); font-family: " microsoft="" white-space:="" /><span style="color: rgb(51, 51, 51); font-family: " microsoft="" font-size:="">5、我会对成功的链接经常访问，对于被K的站点，暂时会将链接撤回内页，正常后恢复！</span></p>
                </div>
            </div>
        </article>
        <div class="blog_links write2014">
            <h4 class="h4-tit t-blue translucent pd10 afterbg mb30"><i class="el-pencil-alt"></i> 填写友情链接信息：</h4>
            <form id="myform" url="/plugin/link/link_add" class="layui-card-body layui-form layui-form-pane">
                <div class="layui-form-item">
                    <label class="layui-form-label"><i class="layui-icon layui-icon-username"></i></label>
                    <div class="layui-input-block">
                        <input name="u_title" type="text" id="u_title" value="" class="layui-input" maxlength="16" placeholder="您的网站标题（必须）" sucmsg=" " datatype="*1-16" nullmsg="请填写您的网站标题！" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><i class="layui-icon layui-icon-release"></i></label>
                    <div class="layui-input-block">
                        <input name="u_mail" type="text" id="u_mail" class="layui-input" value="" maxlength="35" placeholder="您的邮箱（必填）" sucmsg=" " datatype="e" nullmsg="请填写您的邮箱！" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><i class="layui-icon layui-icon-website"></i></label>
                    <div class="layui-input-block">
                        <input name="u_url" type="text" id="u_url" class="layui-input" maxlength="16" value="" placeholder="您的网站（必填）" datatype="url" sucmsg=" " />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><i class="layui-icon layui-icon-dialogue"></i></label>
                    <div class="layui-input-block">
                        <textarea name="content" id="content" style="display:none" maxlength="600" sucmsg=" " datatype="*5-600" nullmsg="请填写评论内容！"></textarea>
                        <div class="cmt_txt" id="cmt_txt" name="cmt_txt" contenteditable="true"></div>
                        <div class="cmt_control clearfix">
                            <div class="left">
                                <div class="emot po_re">
                                    <a href="#" onClick="return insertEmot(this,'cmt_txt');" class="emot_btn">插入表情</a>
                                </div>
                            </div>
                            <div class="right">文明上网 礼貌发帖　<span id="cmt_tip">0/600</span></div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><i class="layui-icon layui-icon-vercode"></i></label>
                    <div class="layui-input-block">
                        <input name="code" type="text" placeholder="验证码" class="layui-input" style="width:110px" sucmsg=" " datatype="s4-4" errormsg="请填写4位验证码" nullmsg="请填写验证码！" />
                        <span onclick="ToggleCode(this, '/verify_code/code?width=80&height=36');return false;"  title="看不清楚？点击刷新">
                            <img class="login-captcha" src="/verify_code/code?width=80&height=36">
                        </span>
                    </div>
                </div>
                <input name="site" type="hidden" value="@Model.site.id"/>
                <input type="hidden" value="" id="fd_position" name="fd_position"/>
                <div class="feed-sub"><input type="submit" class="btn btn-inverse sub-fd" id="cmt_btn" value="提交链接" /></div>
            </form>
        </div>
    </section>
    @Html.Partial("_myaside")
</div>
@section Scripts{
    <script type="text/javascript" src="@Model.templateskin/js/comments2014.js"></script>
    <script type="text/javascript" src="@Model.templateskin/js/emotdata.js"></script>
    <script type="text/javascript">
        layui.use(['validform', 'form'], function () {
            $("#myform").initValidTextarea(600, "cmt_txt", "cmt_tip", "cmt_btn", "content");
        });
    </script>
}